<?php
if (!$this->isBlockNameAldreadyExists) {

    // get all params of block
    $blockParams = $this->blockParams;

    $showBoder = isset($blockParams['showBoder'])?$blockParams['showBoder']:true;
    $strBorder = '';
    if(!$showBoder) {
        $strBorder = ' style="border:0px;"';
    }

    // render block if name of block has not used
?>
    <div class="portlet" id="<?php echo $blockParams['id'];?>" <?php echo $strBorder;?>>
        <?php
        $hideTitle = isset($blockParams['hideTitle'])?$blockParams['hideTitle']:false;
        if(!$hideTitle) {
        ?>
        <div class="portlet-header">
            <?php
            $showTitle = isset($blockParams['showTitle'])?$blockParams['showTitle']:true;
            if($showTitle) {
                echo @$blockParams['title']?$blockParams['title']:(@$blockParams['id']?$blockParams['id']:'No title');
            } else {?>
            &nbsp;
            <?php } // not show title?>
        </div>
        <?php } // hide title?>


        <div class="portlet-content">
            <?php
            if ($this->showContent) {
                // only show content
                // show content has transfer to block
                echo $this->content;
            } else {
                // call to the other action and render it
                // get and show data from other action
                echo $this->action($this->action, $this->module, $this->controller, $blockParams);
            }
            ?>
        </div>
    </div>
<?php
}
?>